package com.zzu.base.controller.permission.vo;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;

@Data
public class PermissionAddReqVO {
    @NotBlank(message = "权限名称不能为空")
    @Size(min = 1,max = 20,message = "权限名称长度为1-20个字符")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5a-zA-Z0-9]*$",message = "权限名称有非法字符")
    private String permissionName;
    @NotBlank(message = "权限代码不能为空")
    @Size(min = 1,max = 20,message = "权限代码长度为1-20个字符")
    @Pattern(regexp = "^[a-zA-Z0-9:_\\-]*$",message = "权限代码有非法字符")
    private String permissionCode;
}
